import { S } from '../../s';
import { IPSDEChartAxes } from './ipsdechart-axes';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { IPSSysPFPlugin } from '../../res/ipssys-pfplugin';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEChartAxesImpl
  extends PSModelObjectImpl
  implements IPSDEChartAxes
{
  get axesPos(): 'left' | 'bottom' | 'right' | 'top' | 'radial' | 'angular' {
    return this.M.axesPos;
  }

  get axesType(): 'numeric' | 'time' | 'category' | 'log' {
    return this.M.axesType;
  }

  protected cappslanguageres: IPSLanguageRes;
  getCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.cappslanguageres ||
      (this.cappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getCapPSLanguageRes,
        S._2a8,
      ) as IPSLanguageRes)
    );
  }

  get caption(): string {
    return this.M.caption;
  }

  get coordinateSystemIndex(): number {
    return this.M.coordinateSystemIndex;
  }

  get dataShowMode(): 0 | 1 | 2 | 3 {
    return this.M.dataShowMode != null ? this.M.dataShowMode : 0;
  }

  get maxValue(): number {
    return this.M.maxValue;
  }

  get minValue(): number {
    return this.M.minValue;
  }

  protected pssyspfplugin: IPSSysPFPlugin;
  getPSSysPFPlugin(): IPSSysPFPlugin | null {
    return (
      this.pssyspfplugin ||
      (this.pssyspfplugin = this.fillObjectModel(
        S._27c,
        this.M.getPSSysPFPlugin,
        S._2a7,
      ) as IPSSysPFPlugin)
    );
  }
  get cls(): string {
    return 'PSDEChartAxesImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._dc) return true;
    return super.instanceof(cls);
  }
}
